$(function() {
	
 
	//用户信息注册
	$("#btnSave").click(function() {
		document.forms[0].action = appPath + "/webcom/registerUser.action";
		document.forms[0].submit();	
	});
	
	$("#btnReturn").click(function() {

		document.forms[0].action ="../webgoods/homePageInit.action";
		document.forms[0].submit();
	
	});
	
	
});
	

function insertAgain(){
	var password=$("#password").val();
	var passwordSure=$("#passwordSure").val();
	if(password != passwordSure){
		var passwordSureErrorMsg=$("#passwordSureErrorMsg").val();
		document.getElementById("warm").innerHTML="<font color='red'>"+passwordSureErrorMsg+"</font>";
	    return;
	}
	else{
		document.getElementById("warm").innerHTML="";
	}
}

function insertPassword(){
	var password=$("#password").val();
	if(password.length>0){
		document.getElementById("passwordwarm").innerHTML="";	
	}
	
}

function multCheck(){
	var email=$("#email").val();
	$.get("../webemail/checkMultiEmail.action?email="+email,function(data){ 		
	    checkInit(data);
	},"json");
}

function checkInit(data){
	var checkFlag=data.checkFlag;
	if(checkFlag==false){
		 var emailAgainMsg=$("#emailAgainMsg").val();
		document.getElementById("emailWarm").innerHTML="<font color='red'>"+emailAgainMsg+"</font>";
	    return;
	}
	else{
		document.getElementById("emailWarm").innerHTML="";
	}
}
